<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateExamineRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('examine_records', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('flow_id')->comment('审批流程id');
            $table->string('type')->comment('审核类型');
            $table->integer('type_id')->comment('类型id');
            $table->integer('order_id')->comment('审批排序id');
            $table->integer('check_user_id')->comment('审批人id');
            $table->timestamp('check_time')->comment('审批时间');
            $table->tinyInteger('status')->comment('1审核通过 0审核失败');
            $table->string('content')->comment('审批意见')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('examine_records');
    }
}
